﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Edit.aspx.cs" Inherits="lauimini_webform.edit" %>


<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link href="Static/lib/layui-v2.6.3/css/layui.css" rel="stylesheet" />
    <link href="Static/css/public.css" rel="stylesheet" />
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server" class="layui-form layuimini-form" method="post">

        <div class="layui-form-item">
            <label class="layui-form-label required">标题</label>
            <div class="layui-input-block">
                <asp:TextBox ID="Title" runat="server" lay-verify="required" lay-reqtext="标题不能为空" placeholder="请输入标题" class="layui-input"></asp:TextBox>
                <tip>填写任务的标题。</tip>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">任务描述</label>
            <div class="layui-input-block">
                <asp:TextBox ID="decription" runat="server" placeholder="请输入任务描述" class="layui-input"></asp:TextBox>
                <tip>填写任务的描述。</tip>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">开始时间</label>
            <div class="layui-input-block">
                <asp:TextBox ID="StartTime" runat="server" TextMode="DateTimeLocal" lay-verify="required" lay-reqtext="开始时间不能为空" placeholder="请输入开始时间" class="layui-input"></asp:TextBox>
                <tip>填写任务的开始时间。</tip>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">结束时间</label>
            <div class="layui-input-block">
                <asp:TextBox ID="EndTime" runat="server" TextMode="DateTimeLocal" lay-verify="required" lay-reqtext="结束时间不能为空" placeholder="请输入开始时间" class="layui-input"></asp:TextBox>
                <tip>填写任务的结束时间。</tip>
            </div>
        </div>


        <div class="layui-form-item">
            <div class="layui-input-block">
                <asp:Button ID="Button1" runat="server" Text="提交" class="layui-btn layui-btn-normal" OnClick="Button1_Click" />
                <asp:Button ID="Button2" runat="server" Text="清空数据" class="layui-btn layui-btn-danger" OnClick="Button2_Click" />
               <%-- <asp:Button ID="Button3" runat="server" Text="返回首页" class="layui-btn" OnClick="Button3_Click" />--%>
            </div>
        </div>
    </form>


    <script src="Static/lib/layui-v2.6.3/layui.js"></script>

    <script>
        layui.use(['form'], function () {
            var form = layui.form,
                layer = layui.layer,
                $ = layui.$;

            //监听提交
            form.on('submit(saveBtn)', function (data) {
                var index = layer.alert(JSON.stringify(data.field), {
                    title: '最终的提交信息'
                }, function () {

                    // 关闭弹出层
                    layer.close(index);

                    var iframeIndex = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(iframeIndex);

                });

                return false;
            });

        });
    </script>
</body>
</html>

